class SaleEscortcodetrackinfo {
  String? escortcode;
  String? trackinfo;
  String? trackdate;

  SaleEscortcodetrackinfo({
    this.escortcode,
    this.trackinfo,
    this.trackdate,
  });

  SaleEscortcodetrackinfo copyWith(
      {String? escortcode, String? trackinfo, String? trackdate}) {
    return new SaleEscortcodetrackinfo(
        escortcode: escortcode ?? this.escortcode,
        trackinfo: trackinfo ?? this.trackinfo,
        trackdate: trackdate ?? this.trackdate);
  }

  @override
  String toString() {
    return '''SaleEscortcodetrackinfo{
      escortcode: escortcode,
      trackinfo: trackinfo,
      trackdate: trackdate
    }''';
  }

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      (other is SaleEscortcodetrackinfo &&
          runtimeType == other.runtimeType &&
          escortcode == other.escortcode &&
          trackinfo == other.trackinfo &&
          trackdate == other.trackdate);

  factory SaleEscortcodetrackinfo.fromMap(Map<String, dynamic> map) {
    return new SaleEscortcodetrackinfo(
      escortcode: map['escortcode'] != false
          ? map['escortcode'].toString() as String?
          : "",
      trackinfo: map['trackinfo'] != false
          ? map['trackinfo'].toString() as String?
          : "",
      trackdate: map['trackdate'] != false
          ? map['trackdate'].toString() as String?
          : "",
    );
  }

  Map<String, dynamic> toMap() {
    // ignore: unnecessary_cast
    return {
      'escortcode': this.escortcode,
      'trackinfo': this.trackinfo,
      'trackdate': this.trackdate,
    } as Map<String, dynamic>;
  }

  List toDomainList() {
    List list = [
      if (this.escortcode != null && this.escortcode != '')
        ['escortcode', '=', this.escortcode!],
    ] as List;
    // ignore: unnecessary_cast
    return list;
  }

  Map<String, dynamic> toOdooMap() {
    // ignore: unnecessary_cast
    return {
      'escortcode': this.escortcode,
      'trackinfo': this.trackinfo,
      'trackdate': this.trackdate,
    } as Map<String, dynamic>;
  }
}
